﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Assignment
{
    class SortByPriority : IComparer<Todo>
    {
        public int Compare(Todo td, Todo td1)
        {
            return td1.Priority.CompareTo(td.Priority);
        }
    }

    class SortByCreateDate : IComparer<Todo>
    {
        public int Compare(Todo td1, Todo td)
        {
            return td.CreateDate.CompareTo(td1.CreateDate);
        }

    }

    class SortByDueDate : IComparer<Todo>
    {
        public int Compare(Todo td1, Todo td)
        {
            return td.DueDate.CompareTo(td1.DueDate);
        }

    }
    class SortByComplete : IComparer<Todo>
    {
        public int Compare(Todo td1, Todo td)
        {
            return td.Status.CompareTo(td1.Status);
        }

    }
}
